First test with integral effect. Used the unit step function as input for ed. Works very good with the first guess for Q.